Ext.define('App.controller.lableType.LableTypeSingleSelectController', {
	extend : 'Ext.app.ViewController',
	alias : 'controller.lableTypeSingleSelectController',
	control : {
		'lableTypeSingleSelectWindow [action=save]' : {
			click : function(me) {
				var win = me.up('window'),id,lableName;
				var selection = win.down('lableTypeSingleSelectList').getSelectionModel().getSelection();
				if(selection.length > 0){
					var record = selection[0];
					id = record.get('id');
                    lableName = record.get('lableName');
				}
				var select = win.lableTypeSingleSelect;
				select.down('[itemId=lableTypeId]').setValue(id);
				select.down('[itemId=lableName]').setValue(lableName);
				win.close();
			}
		}
	},
	tbarSearch : function() {
		BaseUtil.loadStore(Ext.StoreMgr
				.get('lableType.LableTypeSingleSelectStore'), Ext.getCmp(
				'lableTypeSingleSelectWindow').down('form').getForm()
				.getFieldValues());
	}
});